## Configuração para social5dgegf5a7k.onion

## Tor
server {
  listen 127.0.0.1:42909;
  allow 127.0.0.1;
  deny all;

  add_header X-Frame-Options SAMEORIGIN;
  add_header X-Content-Type-Options nosniff;

  server_name social5dgegf5a7k.onion;

  root /var/www/git/social.pirata.xyz;

  index index.php;

  location ~* \.php$ {
    #include snippets/fastcgi-php.conf;
    try_files $uri $uri/ /index.php;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/var/run/php5-fpm-social.sock;
    include fastcgi_params;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_read_timeout 300;
  }

  #add_header X-Frame-Options DENY;
  add_header X-Content-Type-Options nosniff;

  ## Location
  location / {
    try_files $uri $uri/ @gnusocial;
  }

  ## Fancy URLs
  location @gnusocial {
    rewrite ^(.*)$ /index.php?p=$1 last;
    break;
  }

  ## Restrict access that is unnecessary anyway
  location ~ /\.(ht|git) {
    deny all;
  }

  location ~* ^/(.*)\.(ico|css|js|gif|png|jpg|bmp|JPG|jpeg)$ {
    root /var/www/git/social.pirata.xyz;
    rewrite ^/(.*)$ /$1 break;
    access_log off;
    expires max;
  }
}
server {
  listen 127.0.0.1:42902;
  allow 127.0.0.1;
  deny all;

  add_header X-Frame-Options SAMEORIGIN;
  add_header X-Content-Type-Options nosniff;

  server_name ro4a6wyb4bjqpqgg.onion;

  return 301 http://social5dgegf5a7k.onion$request_uri;
}

